import request from "./request"

// 首页模块
class Index {
	// 资讯列表
	static newsList = data => request({
		url: "/user/news/list",
		data: data,
		method: "GET"
	})
	// 资讯详情
	static newsGet = data => request({
		url: "/user/news/get",
		data: data,
		method: "GET"
	})
};

// 生活缴费
class Fee {
	// 缴费列表
	static feeList = data => request({
		url: "/user/fee/list",
		data: data,
		method: "GET"
	})
	// 缴费类型
	static feeTypeList = data => request({
		url: "/user/feetype/list",
		data: data,
		method: "GET"
	})
};


// 登录模块
class login {
	//会员登录获取验证码
	static codElogin = data => request({
		url: "/member/loginByCode",
		data: data,
		method: "POST"
	});
	//验证码登录
	static sendCode = data => request({
		url: "/member/sendcode",
		data: data,
		method: "POST"
	});
	//会员注册验证码登录
	static regByCode = data => request({
		url: "/member/regByCode",
		data: data,
		method: "POST"
	});
	//会员注册获取验证码
	static memberCode = data => request({
		url: "/member/sendcode",
		data: data,
		method: "POST"
	});
	///注册
	static reg = data => request({
		url: "/member/reg",
		data: data,
		method: "POST"
	});
	///用户密码登录方式
	static member = data => request({
		url: "/member/login",
		data: data,
		method: "POST"
	});
};
//门店
class Stores {
	//列表
	static storesList = data => request({
		url: "/user/stores/list",
		data: data,
		method: "GET"
	});
	//服务范围
	static storeservices = data => request({
		url: "/user/storeservices/list",
		data: data,
		method: "GET"
	});
	//详情
	static userStoes = data => request({
		url: "/user/stores/get",
		data: data,
		method: "GET"
	})
}
// 报修
class Repairs {
	// 报修类型
	static Type = data => request({
		url: "/user/repairstype/list",
		data: data,
		method: "GET"
	})
	// 报修状态
	static State = data => request({
		url: "/user/repairstate/list",
		data: data,
		method: "GET"
	})
// 添加报修
	static add = data => request({
		url: "/user/repairs/add",
		data: data,
		method: "POST"
	})
	// 报修记录
	static List = data => request({
		url: "/user/repairs/list",
		data: data,
		method: "get"
	})
	// 删除报修
	static delete = data => request({
		url: "/user/repairs/delete",
		data: data,
		method: "get"
	})
	// 报修详情
	static details = data => request({
		url: "/user/repairs/get",
		data: data,
		method: "get"
	})
}

//车辆
class Car {
	//车辆添加
	static AddCar = data => request({
		url: "/user/car/add",
		data: data,
		method: "POST"
	});
};
//反馈
class Feedback {
	//车辆添加
	static ProblemList = data => request({
		url: "/user/questions/list",
		data: data,
		method: "get"
	});
};
// 导出
export {
	Index,
	Repairs,
	login,
	Stores,
	Fee,
	Car,
	Feedback,
}
